package service;
import exception.BusinessException;
import model.Item;
import model.Order;

import java.time.LocalDateTime;
import java.util.List;

public interface IOrderService {
    /**
     * 创建订单
     *
     * @param items 商品表单
     * @param isVIP 是否为VIP(true/false)
     * @param currenTime 当前时间
     * @return resorder 商品订单
     */
    Order createOrder(List<Item> items, boolean isVIP, LocalDateTime currenTime)throws BusinessException;

    /**
     * 取消订单
     * @param orderId 订单id
     * @param currentTime 当前时间
     */
    void cancelOrder(String orderId,LocalDateTime currentTime)throws BusinessException;

}
